//
//  NMyFocusThemeTableViewCell.m
//  News
//
//  Created by zhangtao on 2018/10/13.
//  Copyright © 2018年 zt.td. All rights reserved.
//

#import "NMyFocusThemeTableViewCell.h"

@implementation NMyFocusThemeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

    _focusBtn.layer.borderWidth = 1;
    _focusBtn.layer.borderColor = RGB(76, 195, 138, 1).CGColor;
    _focusBtn.layer.cornerRadius = 2;

}

- (IBAction)focus:(id)sender {
    _focusBtn.selected = !_focusBtn.selected;
    
    
    if (_focusBtn.selected) {
        _focusBtn.backgroundColor = [UIColor whiteColor];// RGB(76, 195, 138, 1);
        [_focusBtn setTitleColor:RGB(76, 195, 138, 1) forState:UIControlStateNormal];
    }else{
        _focusBtn.backgroundColor = RGB(76, 195, 138, 1);// RGB(76, 195, 138, 1);
        [_focusBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    }
}

- (void)bindData:(FollowTopicOfSubscriberModel *)model
{
    self.nameLab.text = model.topicalName;
    self.wenzhangNum.text = [NSString stringWithFormat:@"%@",@(model.articleNum)];
    self.careNum.text = [NSString stringWithFormat:@"%@",@(model.followNum)];
    [self.heardImgView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",ImageUrl,model.topicalName]] placeholderImage:[UIImage imageNamed:@"img"]];
}

@end
